// import { request } from "../utils/request";
import fly from "../utils/request";

export const fetchAppleList = (params) => {
  return fly.get("/api/Person", params).then((res) => res.data);
};

export const fetchAppleItem = (params) => {
  return fly.get("/api/Person/detail", params).then((res) => res.data);
};
export const addPerson = (params, data) => {
  return fly
    .post("/api/Person", data, {
      params: params,
    })
    .then((res) => res.data);
};
export const deletePerson = (params, data) => {
  return fly
    .post("/api/Person/delete", data, {
      params: params,
    })
    .then((res) => res.data);
};
export const editPerson = (params, data) => {
  return fly
    .post("/api/Person/edit", data, {
      params: params,
    })
    .then((res) => res.data);
};

export const addDtl = (params, data) => {
  return fly
    .post("/api/ruku/add", data, {
      params: params,
    })
    .then((res) => res.data);
};
export const deleteDtl = (params, data) => {
  return fly
    .post("/api/ruku/delete", data, {
      params: params,
    })
    .then((res) => res.data);
};
